package com.wuye.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Weixiu entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "weixiu", catalog = "test")
public class Weixiu implements java.io.Serializable {

	// Fields

	private Integer id;
	private Users users;
	private String neirong;
	private Date shijian;
	private Integer type;

	// Constructors

	/** default constructor */
	public Weixiu() {
	}

	/** full constructor */
	public Weixiu(Users users, String neirong, Date shijian, Integer type) {
		this.users = users;
		this.neirong = neirong;
		this.shijian = shijian;
		this.type = type;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "usersid")
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@Column(name = "neirong", length = 500)
	public String getNeirong() {
		return this.neirong;
	}

	public void setNeirong(String neirong) {
		this.neirong = neirong;
	}

	@Column(name = "shijian", length = 0)
	public Date getShijian() {
		return this.shijian;
	}

	public void setShijian(Date shijian) {
		this.shijian = shijian;
	}

	@Column(name = "type")
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

}